#pragma once
#include "DataDef.h"
#include <vector>

using namespace std;

class Gaussian
{
public:
	Gaussian(const WORD samples);

	~Gaussian(void);

	void setBlurParametersH(const FLOAT dx, const FLOAT dy);

	void setBlurParametersV(const FLOAT dx, const FLOAT dy);

	const vector<D3DXVECTOR4> getHOffsets() const
	{
		return sampleOffsetsH;
	}

	const vector<FLOAT> getHWeights() const
	{
		return sampleWeightsH;
	}

	const vector<D3DXVECTOR4> getVOffsets() const
	{
		return sampleOffsetsV;
	}

	const vector<FLOAT> getVWeights() const
	{
		return sampleWeightsV;
	}

private:
	WORD samples;

	void setBlurParameters(const FLOAT dx, const FLOAT dy, vector<D3DXVECTOR4> &vSampleOffsets, vector<FLOAT> &fSampleWeights);
	FLOAT ComputeGaussian(const FLOAT n);

	vector<D3DXVECTOR4> sampleOffsetsH;
	vector<FLOAT> sampleWeightsH;
	vector<D3DXVECTOR4> sampleOffsetsV;
	vector<FLOAT> sampleWeightsV;

	D3DXVECTOR2 *texelSize;
};
